<template>
  <div>
    <router-view/>
  </div>
</template>

<script>
export default {
	created() {
		if(this.isMobile()){
			window.location.href="https://www.baidu.com"
		}
	},
	methods: {
		//判断客户端是移动端还是PC端
		isMobile() {
			let userAgentInfo = navigator.userAgent;
			let Agents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
			let getArr = Agents.filter(i => userAgentInfo.includes(i));
			return getArr.length ? true : false;
		}
	},
};
</script>

<style lang="scss" scoped>
</style>